package com.itheima.demo;

import com.itheima.domain.Orders;
import com.itheima.domain.User;
import com.itheima.mapper.OrdersMapper;
import com.itheima.utils.MapperUtil;

import java.util.List;

public class Demo {
    public static void main(String[] args) {
        OrdersMapper mapper = MapperUtil.getMapper(OrdersMapper.class);
        List<Orders> list = mapper.findAll();
        System.out.println("list: "+list);
        for (Orders orders : list) {
            System.out.println("订单编号："+orders.getNumber());
            System.out.println("用户名称:"+orders.getUser().getUsername());
        }
    }
}
